<?php
/**
 * Class 订单.
 * User: chan
 * Date: 2017/10/20 11:22
 */

namespace app\api\controller;
class Order extends Base
{
    //检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'except' => 'except'
        ],
    ];

    /**
    *   订单列表
    */
    public function orderList(){
        $orderList =  (new \app\api\logic\Order())->orderList();
        return $this->ajaxReturn($orderList);
    }

    /**
     *  订单详情
     */
    public function orderInfo()
    {
        $orderInfo =  (new \app\api\logic\Order())->orderInfo();
        return $this->ajaxReturn($orderInfo);
    }

    /**
    *  预览订单
    */
    public function orderPreview(){
        $orderPreview =  (new \app\api\logic\Order())->orderPreview();
        return $this->ajaxReturn($orderPreview);
    }

    /**
     *  生成订单
     */
    public function orderAdd()
    {
        $orderAdd =  (new \app\api\logic\Order())->orderAdd();
        return $this->ajaxReturn($orderAdd);
    }

    /**
    *   订单更新
    */
    public function orderUpdate()
    {
        $orderUpdate =  (new \app\api\logic\Order())->orderUpdate();
        return $this->ajaxReturn($orderUpdate);
    }

    /**
    *   订单退货申请
    */
    public function orderReturn(){
        $orderReturn =  (new \app\api\logic\Order())->orderReturn();
        return $this->ajaxReturn($orderReturn);
    }

    /**
    *   退货订单凭证图片上传
    */
    public function orderReturnImg(){
        $orderReturnImg =  (new \app\api\logic\Order())->orderReturnImg();
        return $this->ajaxReturn($orderReturnImg);
    }

    /**
    *   订单退款审核
    */
    public function orderReturnUpdate(){
        $orderReturnUpdate =  (new \app\api\logic\Order())->orderReturnUpdate();
        return $this->ajaxReturn($orderReturnUpdate);
    }

    /**
    *   退货订单列表
    */
    public function orderReturnList(){
        $orderReturnList =  (new \app\api\logic\Order())->orderReturnList();
        return $this->ajaxReturn($orderReturnList);
    }

    /**
    *   退货订单详情
    */
    public function orderReturnInfo(){
        $orderReturnInfo =  (new \app\api\logic\Order())->orderReturnInfo();
        return $this->ajaxReturn($orderReturnInfo);
    }

    /**
    *   商品评论
    */
    public function orderReview(){
        $orderReview =  (new \app\api\logic\Order())->orderReview();
        return $this->ajaxReturn($orderReview);
    }
}